//@author A0106044
package logic;

/**
 * 
 *
 * 	       Sothearith Sreang
 *         All of the Logic part is written by me.
 * 
 */

public class EventTypeDeterminer {
	
	public enum COMMAND_TYPE { ADD_TASK, DELETE_TASK, EDIT_TASK, DISPLAY, UNDO, REDO, COMPLETE_TASK,
		PENDING_TASK, CLEAR, EXIT, INVALID
	};
	
	public EventTypeDeterminer() { }
	
	public static COMMAND_TYPE determineEventType(String command) {
		
		switch(command.toUpperCase()) {
		
			case "ADD":
				return COMMAND_TYPE.ADD_TASK;
				
			case "REMOVE":
				return COMMAND_TYPE.DELETE_TASK; 
			
			case "EDIT":
				return COMMAND_TYPE.EDIT_TASK;
				
			case "DISPLAY":
				return COMMAND_TYPE.DISPLAY;
				
			case "UNDO":
				return COMMAND_TYPE.UNDO;
				
			case "REDO":
				return COMMAND_TYPE.REDO;
				
			case "COMPLETE":
				return COMMAND_TYPE.COMPLETE_TASK;
			
			case "PENDING":
				return COMMAND_TYPE.PENDING_TASK;
				
			case "CLEAR":
				return COMMAND_TYPE.CLEAR;
				
			case "EXIT":
				return COMMAND_TYPE.EXIT;
				
			default:
				return COMMAND_TYPE.INVALID;
			
		}
	}
	
}
